home *** CD-ROM | disk | FTP | other *** search
- ;========================================================================================;
- ;= $VER: 2.2 Future Drive Accelerator FullVersion Installscript by Martin Tauchmann =;
- ;= based on Update_MyProgram V1 written by Thomas Baust
- ;========================================================================================;
-
- (set #Ver ("2.0"))
- (set #OldVer ("2.2"))
- (set #Demo ("Demo"))
-
-
- ;================================= ENGLISH ==================================;
-
- (set languages-default 1)
-
- (set #welc (cat "\n\nThis is a update for FDA\n"
- "V 1.8-"#OldVer" Demo MC68020, to the "#Demo"-Version "#Ver".\n\n"
- ))
-
- (set #whereprogFDA ("Where is `FDA` installed ?\n\"SYS:WBStartup\" will be updated automaticly."))
- (set #whereprogFDAView ("Where is `FDAView` installed ?"))
- (set #whereprogFDAPref ("Where is `FDAPref` installed ?"))
- (set #whereprogFDAdoc ("Choose the `FDAdoc` drawer ?"))
-
- (set #helpwhereprog ("The MainDirectory of the Program, which will be updated."))
-
- (set #patch1_1 (cat "\n\nNow, patching file `")) ;Dateiname wird eingefügt
- (set #patch1_2 (cat "`\nfrom V")) ;Alte Version wird eingefügt
- (set #patch1_3 (cat " to V")) ;Neue Version wird eingefügt
- (set #patch1_4 (cat " ."))
-
- (set #ErrorMsg1_1 "\n\nError while patching file `") ;Dateiname wird eingefügt
- (set #ErrorMsg1_2 "`.\n\n\n")
- (set #ErrorMsg1_21 "case 1 its alright the Version") ;Neue Version wird eingefügt
- (set #ErrorMsg1_3 (cat " or higher"
- "\ncase 2 this Version is not patchable... Are there files i.e. FDAV2.0?"))
- (set #ErrorMsg1_4 "can`t locate File. Are there files i.e. FDAV2.0?")
-
-
- ;===[ German Documentation ]=================================================
-
- (if (= @language "deutsch")
- (
- (set languages-default 2)
-
- (set #welc (cat "\n\nDies ist ein Update für FDA\n"
- "V 1.8-"#OldVer" Demo MC68020, zur "#Demo"-Version "#Ver".\n\n"
- ))
-
- (set #whereprogFDA ("In welchem Verzeichnis ist `FDA` installiert ?\n\"SYS:WBStartup\" wird automatisch geupdated."))
- (set #whereprogFDAView ("In welchem Verzeichnis ist `FDAView` installiert ?"))
- (set #whereprogFDAPref ("In welchem Verzeichnis ist `FDAPref` installiert ?"))
- (set #whereprogFDAdoc ("Wähle das Verzeichnis `FDAdoc` aus ?"))
-
- (set #helpwhereprog ("Das Hauptverzeichnis des Programmes, das upgedatet werden soll."))
-
- (set #patch1_1 "\n\nJetzt wird die Datei `") ;Dateiname wird eingefügt
- (set #patch1_2 "`\nvon V") ;Alte Version wird eingefügt
- (set #patch1_3 " zur V") ;Neue Version wird eingefügt
- (set #patch1_4 " umgewandelt.")
-
- (set #ErrorMsg1_1 "\n\nDas Patchen der Datei `") ;Dateiname wird eingefügt
- (set #ErrorMsg1_2 "`\n ist fehlgeschlagen !!!\n\n\n")
- (set #ErrorMsg1_21 "Es ist bereits die Version ") ;Neue Version wird eingefügt
- (set #ErrorMsg1_3 (cat " oder höher"
- "\noder diese Version ist nicht Updateberechtigt... Sind Files wie z.B. FDAV2.0 vorhanden?"))
- (set #ErrorMsg1_4 "File ist nicht ausfindig zu machen. Sind Files wie z.B. FDAV2.0 vorhanden?")
-
- )
- )
-
- ;-------------------------------------------------
- ; Vergleiche Versionen, und patche die Datei
- ; Verzeichnis, Datei, Neue Versionsnummer
- ;-------------------------------------------------
- (procedure Update #dir #dat #nver
- (set #dat2 (tackon #dir #dat))
-
- (working (cat #patch1_1 #dat #patch1_2 #OldVer #patch1_3 #nver #patch1_4))
- (if (= (exists #dat2) 1)
- (if (= (exists (cat #dat2 "V" #OldVer)) 0)
- (COPYFILES (SOURCE #dat2)
- (DEST #dat2)
- (NEWNAME (cat #dat2 "V" #OldVer))
- (PROMPT "Backup V" #OldVer)
- (SAFE)
- )
- )
- )
- (if (= (exists #dat2) 1)
- (
- (rename #dat2 (cat #dat2".old") (safe))
- (set #cmd (cat "gpatch >\"CON:0/16/570/26/GPatch\" \""#dat2".old\" "#dat".patch \""#dat2 "\"" " RECURSIVE") )
- (MESSAGE #cmd)
- (set #patch (RUN #cmd (SAFE)))
-
- (if (> #patch 0) (rename (cat #dat2".old") #dat2 (safe)))
- (if (> #patch 0) (if (= (exists (cat #dat2 "V" #OldVer)) 1)
- (
- (set #cmd (cat "gpatch >\"CON:0/16/570/26/GPatch\" \""#dat2"V" #OldVer "\" "#dat".patch \""#dat2 "\"" " RECURSIVE") )
- (MESSAGE #cmd)
- (set #patch (RUN #cmd (SAFE)))
- (if (> #patch 0) (message (cat #ErrorMsg1_1 #dat #ErrorMsg1_2 #ErrorMsg1_21 #nver #ErrorMsg1_3) (ALL)) )
- )
- )
- )
- (delete (cat #dat2".old") (safe))
- )
- (
- (if (= (exists (cat #dat2 "V" #OldVer)) 1)
- (
- (set #cmd (cat "gpatch >\"CON:0/16/570/26/GPatch\" \""#dat2"V" #OldVer "\" "#dat".patch \""#dat2 "\"" " RECURSIVE") )
- (MESSAGE #cmd)
- (set #patch (RUN #cmd (SAFE)))
- (if (> #patch 0) (message (cat #ErrorMsg1_1 #dat #ErrorMsg1_2 #nver #ErrorMsg1_3) (ALL)) )
- )
- (
- (message (cat #ErrorMsg1_1 #dat #ErrorMsg1_2 #ErrorMsg1_4) (ALL))
- )
- )
- )
- )
-
- )
-
- ;-------------------------------------------------
- ;Starte Update
- ;-------------------------------------------------
- (complete 0)
- (message #welc (ALL))
- (welcome)
-
- ;-------------------------------------------------
- ;Frage nach Verzeichnis des Programmes
- ;-------------------------------------------------
- (set @default-dest (askdir (prompt #whereprogFDA) (help #helpwhereprog) (default "SYS:System/")))
- (complete 15)
-
- ;-------------------------------------------------
- ;Update Hauptprogramm
- ;-------------------------------------------------
-
- (Update @default-dest "FDA" #Ver)
- (complete 30)
- (set @default-dest (askdir (prompt #whereprogFDAView) (help #helpwhereprog) (DEFAULT @default-dest)))
-
- (IF (= (exists "SYS:WBStartup/FDA") 1)
- (
- (working "updating SYS:WBStartup")
- (SET #cmd ("c:MakeLink SYS:WBStartup/%s %s%s" "FDA" @default-dest "FDA") )
- (DELETE "SYS:WBStartup/FDA" (OPTIONAL "FORCE") (DELOPTS (SAFE) ))
- (set #rc (RUN #cmd (SAFE)))
- (if (> #rc 0)
- (
- (message "Link installing in \"SYS:WBStartup\" fails.\nNow copy a duplicate" (ALL))
- (COPYFILES (SOURCE (TACKON @default-dest "FDA"))
- (DEST "SYS:WBStartup")
- (safe)
- )
- )
- )
- )
- )
- (DELETE (TACKON @default-dest "FDAV2.0") (OPTIONAL "FORCE") (DELOPTS (SAFE) (INFOS)))
- (complete 45)
- (Update @default-dest "FDAView" #Ver)
- (DELETE (TACKON @default-dest "FDAViewV2.0") (OPTIONAL "FORCE") (DELOPTS (SAFE) (INFOS)))
- (complete 60)
- (set @default-dest (askdir (prompt #whereprogFDAPref) (help #helpwhereprog) (default "SYS:Prefs/")))
- (complete 75)
- (Update @default-dest "FDAPref" #Ver)
- (DELETE (TACKON @default-dest "FDAPrefV2.0") (OPTIONAL "FORCE") (DELOPTS (SAFE) (INFOS)))
- (complete 90)
- (set @default-dest (askdir (prompt #whereprogFDAdoc) (help #helpwhereprog) (default "SYS:Prefs/FDAdoc")))
- (COPYFILES (SOURCE "/FDA-News.readme") (DEST @default-dest))
- (complete 100)
-
- ;-------------------------------------------------
- ;Fertig...
- ;-------------------------------------------------
-
- (IF (= (exists "/FDA-News.readme") 1)
- (set #rc (RUN "RUN SYS:Utilities/MultiView /FDA-News.readme"))
- )
-
- (exit)
-
-